package hfdp.chp01.chp0101;

public class Strategy01Main {

	public static void main(String[] args) {
		Duck decoyDuck = new DecoyDuck();
		decoyDuck.display();
		decoyDuck.setFlyBehavior(new FlyNoWay());
		decoyDuck.performFly();
		decoyDuck.setQuackBehavior(new Squeak());
		decoyDuck.performQuack();
		
		Duck mallardDuck = new MallardDuck();
		mallardDuck.display();
		mallardDuck.setFlyBehavior(new FlyWithWings());
		mallardDuck.performFly();
		mallardDuck.setQuackBehavior(new Quack());
		mallardDuck.performQuack();
		
		Duck rubberDuck = new RubberDuck();
		rubberDuck.display();
		rubberDuck.setFlyBehavior(new FlyNoWay());
		rubberDuck.performFly();
		rubberDuck.setQuackBehavior(new MuteQuack());
		rubberDuck.performQuack();
	}

}
